package com.maigang.controller.supermanager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.maigang.pojo.supermanager.SuperUser;
import com.maigang.service.supermanager.SuperUserService;

@Controller
@RequestMapping("/Manager")
public class SuperManagerController {

	@Autowired
	SuperUserService superUserService;
	
	@RequestMapping("/SuperManager")
	public String goToSuper(){
		return "supermanager/SuperManager";
		
	}

	/**
	 * 个人信息
	 */
	@RequestMapping("/getSuperManagerInfo")
	public ModelAndView getSuperManagerInfo(){
		SuperUser user=superUserService.selectUser("13971501573");
		ModelAndView model =new ModelAndView();
		if(user!=null){
			
			model.setViewName("supermanager/userinfo.ftl");
			model.addObject("user",user);
		}
		return model;
	}
}
